package com.sample.generator.config.impl;

public class FileWriterConfigFactory {

	private String encoding;

	public FileWriterConfigFactory(String encoding) {

		if (encoding == null) {
			throw new IllegalArgumentException("Argument encoding is null.");
		}
		this.encoding = encoding;

	}

	public FileWriterConfig createFileWriterConfig(String path) {

		if (path == null) {
			throw new IllegalArgumentException("Argument path is null.");
		}
		return new FileWriterConfig(path, encoding);
	}
}
